
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets" template="/template/mainSemMenu.xhtml">

	<ui:define name="body">
		<h:form prependId="false" id="form">

			<br />
			<p:dataTable id="list" var="bean" value="#{pedidoListarProducaoMB.resultList}">
				<p:column style="width:5%;font-size:12;" sortBy="#{bean.idPedido}">
					<f:facet name="header">#{messages['pedido.label.id']}</f:facet>
					<h:outputText value="#{bean.idPedido}" />
				</p:column>

				<p:column style="font-size:12;" sortBy="#{bean.nomeCliente}">
					<f:facet name="header">#{messages['pedido.label.cliente']}</f:facet>
					<h:outputText value="#{bean.nomeCliente}" />
				</p:column>

				<p:column style="font-size:12;">
					<f:facet name="header">#{messages['pedido.label.dataAgendamento']}</f:facet>
						<h:outputText value="#{bean.dataProducao}"  converter="dateConverter"  rendered="#{not empty bean.dataProducao}" style="font-size:10pt;color:00FF00;font-color:00FF00"/>
						<h:outputText value=" - "  rendered="#{not empty bean.dataProducao}" style="font-size:10pt;color:00FF00;font-color:00FF00"/>
						<h:outputText value="#{bean.horaProducao}"  rendered="#{not empty bean.dataProducao}" style="font-size:10pt;color:00FF00;font-color:00FF00"  converter="horaMinutoConversor" />
						<h:outputText value=":"  rendered="#{not empty bean.dataProducao}" style="font-size:10pt;color:00FF00;font-color:00FF00"/>
						<h:outputText value="#{bean.minutoProducao}"   rendered="#{not empty bean.dataProducao}" style="font-size:10pt;color:00FF00;font-color:00FF00"  converter="horaMinutoConversor" />

						<h:outputText value="Sem Agendamento" rendered="#{empty bean.dataProducao}" style="font-size:10pt;color:00FF00;font-color:00FF00"/>
				</p:column>

				<p:column style="font-size:12;" sortBy="#{bean.dataEntrega}">
					<f:facet name="header">#{messages['pedido.label.dataEntrega']}</f:facet>
					<h:outputText value="#{bean.dataEntrega}"  converter="dateConverter" style="font-size:10pt;color:0000FF;font-color:0000FF" />
					<h:outputText value=" - "  />
					<h:outputText value="#{bean.horaEntrega}" style="font-size:10pt;color:0000FF;font-color:0000FF"  converter="horaMinutoConversor" />
					<h:outputText value=":"  />
					<h:outputText value="#{bean.minutoEntrega}" style="font-size:10pt;color:0000FF;font-color:0000FF" converter="horaMinutoConversor" />
				</p:column>

				<p:column style="font-size:12;" >
					<f:facet name="header">Produtos</f:facet>
					<ui:repeat var="pp" value="#{bean.listaProdutoOTDs}">
						<h:outputText value=" - Qtd. " />
						<h:outputText value="#{pp.quantidade}" style="font-size:10pt;color:FF0000;font-color:FF0000" converter="bigDecimalConversor" />
						<h:outputText value=" #{pp.descricaoProduto}" />
						<h:outputText value="(" />
						<h:outputText value="#{pp.unidadeMedida}" />
						<h:outputText value=")" />
						<br/>
					</ui:repeat>
				</p:column>

				<p:column style="font-size:12;" >
					<f:facet name="header">#{messages['pedido.label.observacao']}</f:facet>
					<h:outputText value="#{bean.observacao}" />
				</p:column>
				
			</p:dataTable>
		</h:form>
	</ui:define>
</ui:composition>